package com.sand.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "userattachment", schema = "ssh_pro", catalog = "")
public class UserattachmentEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int rid;
    private int userId;
    private String idCardF;
    private String idCardN;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "userId")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "idCardF")
    public String getIdCardF() {
        return idCardF;
    }

    public void setIdCardF(String idCardF) {
        this.idCardF = idCardF;
    }

    @Basic
    @Column(name = "idCardN")
    public String getIdCardN() {
        return idCardN;
    }

    public void setIdCardN(String idCardN) {
        this.idCardN = idCardN;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserattachmentEntity that = (UserattachmentEntity) o;
        return rid == that.rid && userId == that.userId && Objects.equals(idCardF, that.idCardF) && Objects.equals(idCardN, that.idCardN);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, userId, idCardF, idCardN);
    }
}
